Could the interfaces contain several definitions of the same constant?
No. To ensure consistancy, a constant should be defined only once, in one interface.
However, it is OK if two interfaces ask for the same method. A class that implements both interfaces only needs to provide one complete method definition to satisfy both interfaces.
An interface can be made public
.
In fact, this is usually what is done.
When a class or interface is public
it must be the only public
class or interface in the file that contains it.
(These notes have been avoiding public classes so that the "copy paste save and run"
method can be used with just one file.)
A public interface can be implemented by any class in any file. Many graphical user interface components implement public interfaces. You must use them to work with the GUI features of Java.